import time
import uuid
import os

from httprunner import __version__
from httprunner.response import ResponseObject


def get_httprunner_version():
	return __version__


def sum_two(m, n):
	return m + n


def sleep(n_secs):
	time.sleep(n_secs)


def random_md5():
	"""随机生成MD5值"""
	return str(uuid.uuid4())


def get_host() -> str:
	"""获取host"""
	if os.getenv('test_env') == 'test':
		return 'https://mubu.net/'
	else:
		return 'https://mubu.com/'


def get_folder_num(resp: ResponseObject) -> int:
	resp_json = resp.resp_obj.json()
	folder_nums = len(resp_json['data']['folders'])
	print(f'folder_nums: {folder_nums}')
	return folder_nums


def get_member_id_list():
	return ["8786352375767376", "8786352375767673"]
